/*
 * ButtonControl.h
 *
 *  Created on: 25.09.2011
 *      Author: wink
 */

#ifndef BUTTONCONTROL_H_
#define BUTTONCONTROL_H_

typedef enum
{
  Button_Left,
  Button_Right,
  Button_Enter,
  Button_Back,
  Button_Cap,
  Button_Max,
  Button_All, /* for notificaton reasons */
  Button_None
}T_Button ;

void BcoInit( void );
void BcoCyclic( void );

typedef enum
{
  Button_Low2High,
  Button_High2Low,
  Button_High2ExtHigh,
  Button_ExtHigh2Low,
  Button_AllReasons,
  Button_ReasonNotSet,
  Button_ReasonMax
} T_ButtonReason;

typedef void (*T_ButtonNotify) (uint8_t);
void BcoRegisterNotification( T_ButtonNotify iFunc_pt, T_ButtonReason iReason_t, T_Button iButton_t );
void BcoUnregisterNotification( T_ButtonNotify iFunc_pt, T_ButtonReason iReason_t, T_Button iButton_t );

#endif /* BUTTONCONTROL_H_ */
